<html>
<head>
    <title>Ankle Biter's Edit/Delete Pet</title>
   <link rel="stylesheet" href="<?php echo base_url();?>/system/application/css/styles.css" type="text/css" media="screen"/>
</head>
<body>
<div class="center">

<table style="width:1000px; height: 150px;" border="1">
    <tr>

        <td>
            <img src="<?php echo base_url();?>/system/application/images/petshopbanner.jpg" alt="Ankle Biter's Pet Shop" />
        </td>
        </tr>
</table>
<br />
 <table class="right" border="1">
    <tr>

        <td class="right">
            <form name="pet_list_page_button_form" action="display_pet_list" method="POST" style="display: inline;">
           <input type="submit" value="Home / Pets List" name="pet_list_page_button" /></form>
            <form name="about_us_page_button_form" action="display_about_us" method="POST" style="display: inline;">
           <input type="submit" value="About us" name="about_us_page_button" /></form>
            <form name="admin_login_page_button_form" action="display_site_update" method="POST" style="display: inline;">
           <input type="submit" value="Site Administration" name="site_update_page_button" /></form>
        </td>

    </tr>
 </table>
<table style="width:100%;" border="2">
    <tr>

        <td class="style2" style="text-align: center">
            Edit or Delete Pet Record
        </td>

    </tr>
    <tr>
    <td style="background-color:#b5e619;">

    
     <table border="1" cellpadding="3" cellspacing="3" class="detailsbox" style="background-color:white;">
<form name="edit_pet_form" action="add_edit_delete_pet" method="POST" style="display: inline;" enctype="multipart/form-data">
           
<?php foreach($pet as $pet_selected): ?>
         <tr>
           <td>Pet ID:</td>
           <td><input id="pet_id_input" name="pet_id_input" type="text" value='<?php echo $pet_selected->pet_id; ?>'  readonly style="background:silver;"/></td>
           </tr>
         <tr>
           <td >Pet Name:</td>
           <td><input id="name_input" name="name_input" type="text" value='<?php echo $pet_selected->name; ?>'/></td>
           <td>required, max length 40</td>
           </tr>

           <tr>
           <td>Species:</td>
           <td><input id="species_input" name="species_input" type="text" value='<?php echo $pet_selected->species; ?>' /></td>
            <td>required, max length 45</td>
           </tr>

           <tr>
           <td >Breed:</td>

           <td><input id="breed_input" name="breed_input" type="text" value='<?php echo $pet_selected->breed; ?>' /></td>
            <td>optional, max length 45</td>
           </tr>

           <tr>
           <td>Description:</td>
           <td><textarea id="descript_input" name="descript_input" cols="50" rows="6"><?php echo $pet_selected->descript; ?></textarea></td>
           <td>optional, max length 400</td>
           </tr>

           <tr>
           <td>Notes:</td>
           <td><textarea id="notes_input" name="notes_input" cols="50" rows="6"><?php echo $pet_selected->notes; ?></textarea></td>
           <td>optional, max length 400</td>
           </tr>

           <tr>
           <td >Upload First Image:</td>
           <td><input name="pic_input[]" type="file"/></td>
           <td>required, must be .jpg .gif or .png max size 320x240</td>
           </tr>

           <tr>
           <td>Upload Second Image:</td>

           <td><input name="pic_input[]" type="file"/></td>
           <td>optional, must be .jpg .gif or .png max size 320x240</td>
           </tr>

           <tr>
           <td></td>
           <td><input type="submit" value="Edit Record" name="button"/><input type="submit" value="Delete Record" name="button"/></td>
           </tr>
<?php endforeach; ?>
</form>
           </table>
        
           </td>
    </tr>

</table>

</div>
</body>
</html>